#ifndef EDIT_SYMBOL_VIEW_H
#define EDIT_SYMBOL_VIEW_H

#include <QWidget>
#include <QModelIndex>

QT_BEGIN_NAMESPACE
class QLabel;
class QLineEdit;
class QTextEdit;
class QItemSelectionModel;
class QModelIndex;
class QCheckBox;
QT_END_NAMESPACE

class SymbolModel;

class EditSymbolView : public QWidget
{
    Q_OBJECT
    
public:

    explicit EditSymbolView( QWidget * parent = 0 );
    
    void setModel( SymbolModel * model ) { symbolModel = model; }
    
    void currentChanged( const QModelIndex & current, const QModelIndex & previous );
    
private slots:

    void usedStateChanged( int state );
    void nameEditingFinished();
    void commentsEditingFinished();
    
private:

    QLabel
        * idLabel,
        * idValue,
        * nameLabel,
        * usedLabel,
        * commentsLabel;
    QLineEdit
        * nameEdit;
    QTextEdit
        * commentsEdit;
    QCheckBox
        * usedCheckBox;
    QItemSelectionModel
        * selectionModel;
    SymbolModel
        * symbolModel;
    QModelIndex
        currentIndex;

};

#endif